<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题页</title>
<link rel="stylesheet" type="text/css" href="../Admin/role/css/index.css">
<script src="../Admin/role/js/jquery-1.7.1.min.js"></script>
</head>
<body class="mian_bj">
<div class="mian_top_01">
<div class="mian_top_r"></div>
<div class="mian_top_l"></div>
<div class="mian_top_c">

</div>
<div class="mian_b">
<div class="mian_b1">
<a class="mian_b1_a1" href="addComplexMessageLiu.action" title="添加"></a>
<a class="mian_b1_a2" a href="javascript:void(0)" onclick="del()" title="删除"></a>
<p class="mian_b1_sousuo">
<input id="cnumber" name="cnumber" type="text" placeholder="请输入楼栋编号" value=""></p>
<a href="" onclick="chaxun()"  class="mian_b1_a3"></a>
<a href="#" title="最后" class="mian_b1_a4"></a>
<a href="#" title="下一页" class="mian_b1_a5"></a>
<p class="mian_b1_list">1 2 3 4……</p>
<a href="#" title="上一页" class="mian_b1_a6"></a>
<a href="#" title="最前" class="mian_b1_a7"></a>
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mian_b_bg">
<tr>
<td width="5%" class="mian_b_bg_lm"><input name="" type="checkbox" value="">&nbsp;</td>
<td width="11%" class="mian_b_bg_lm"><span></span>排序ID</td>
<td width="25%" class="mian_b_bg_lm"><span></span>楼栋编号</td>
<td width="10%" class="mian_b_bg_lm"><span></span>楼层数</td>
<td width="25%" class="mian_b_bg_lm"><span></span>所属项目</td>
<td width="15%" class="mian_b_bg_lm"><span></span>操作</td>
</tr>
<tr>
   <td>
    <c:forEach var="list" items="${complexs}">
    <tr>
						<td><input name=id type="checkbox" value="${list.id}">&nbsp;</td>
						<td>${list.id}</td>
						<td>${list.cnumber}</td>	
						<td>${list.storey}</td>
						<td>${list.projectname}</td>	
						<td width="8%" class="mian_b_icon_01"><a href="updateComplexMessageLiu.action?id=${list.id}">编辑</a></td>				
    </tr> 
	</c:forEach>
   </td>
<td>
</tr>
</table>
</div>
</div>
</body>
<script type="text/javascript"> 
function del() {
	var id="";
	var value = document.body.querySelectorAll("input[type='checkbox']");
	for (var i = 0; i < value.length; i++) {
		if (value[i].checked) {
			var temp = value[i].value;
			if (temp != null) {
				id +=temp+",";
			}
		}
	}
	if (confirm("确定要删除吗")) {
		location.href = "deleteComplexById.action?id=" + id;
	}
}	
	function chaxun() {
     var $cnumber =$("#cnumber").val();
     alert($cnumber);
     location.href="../complex/selectAllComplexLiu.action?cnumber="+$cnumber;
	}
		
</script>
</html>
